<style>
 /*验证：提示信息样式 begin*/
 .am-alert-danger {
    background-color: transparent;
    border-color: transparent;
    color: red;
  }
  .am-alert {
    margin-bottom: 1em;
    padding: .625em;
    background: transparent;
    border: none;
    border-radius: 0;
  }
  /*验证：提示信息样式 end*/
  /*附件上传*/
  .am-progress-xs {
    height: .2rem;
  }
  .am-progress {
    margin-bottom: 0;
  }
</style>

<input type="hidden" id="promotionId" name="promotionId" value="${promotion.id!''}"/>


<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>名称
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input data-validation-message="输入名称" type="text"  name="name" id="name" minlength="2" maxlength="30" placeholder="输入名称" required value="${promotion.name!''}"/>
    <!-- <label class="lable-alert" for="user-name"></label> -->
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>



<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>商品封面图片
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input type="hidden" id="promo_img" name="img" value="${promotion.img!''}"  readonly  required/>
       <div class="am-form-file am-text-xs" onclick="warning_img_size();">
           <button type="button" class="am-btn am-btn-primary am-btn-sm">
            <i class="am-icon-cloud-upload"></i> 选择要上传的图片
           </button>
           <input id="promo_fileupload" type="file" name="files[]" multiple><span style="color:red;">* 仅支持上传图片文件类型(.jpg,.jpge,.bmp,.gif,.png)</span>
      </div>
       <div id="progress-area" class="am-margin-top-sm am-hide" >
           <div id="progress-text" class="am-text-xs am-text-right"></div>
             <div id="progress" class="am-progress am-progress-xs">
             <div class="am-progress-bar" style="width: 0%"></div>
           </div>
     </div>
  </div>
  
  
  
  <div class="am-u-sm-2 am-u-md-4 input-msg" id="image_valid"></div>
</div>

<!--广告预览图-->
<div class="am-g am-form-group am-margin-top am-hide">
  <div class="am-u-sm-4 am-u-md-2">&nbsp;</div>
  <div class="am-u-sm-6 am-u-md-6" id="banner-img-preview">
    <div class="am-u-sm-4 am-u-md-4" id="banner-img-split"></div>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>



<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>开始时间
  </div>
  <div class="am-u-sm-6 am-u-md-6">
      <div class="am-input-group date form_datetime">
          <span class="am-input-group-label add-on"><i
              class="icon-th am-icon-calendar"></i></span> <input id="start_time" name="start_time" readonly 
              size="16" type="text" value="${promotion.start_time!, dateFormat="yyyy-MM-dd HH:mm:ss"}"
              class="am-form-field" required /> <span
              class="am-input-group-label add-on"><i
              class="icon-remove am-icon-close"></i></span>
      </div>
      <label class="lable-alert" for="addDate"></label>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>

<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <span style="color: red;">*</span>结束时间
  </div>
  <div class="am-u-sm-6 am-u-md-6">
      <div class="am-input-group date form_datetime">
          <span class="am-input-group-label add-on"><i
              class="icon-th am-icon-calendar"></i></span> <input id="end_time" name="end_time" readonly 
              size="16" type="text" value="${promotion.end_time!, dateFormat="yyyy-MM-dd HH:mm:ss"}"
              class="am-form-field" data-validation-message="结束时间不能为空或早于开始时间" required /> <span
              class="am-input-group-label add-on"><i
              class="icon-remove am-icon-close"></i></span>
      </div>
      <label class="lable-alert" for="addDate"></label>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>





<div class="am-g am-form-group am-margin-top">
  <div class="am-u-sm-4 am-u-md-2 am-text-right">
    <!--<span style="color: red;">*</span>-->URL链接
  </div>
  <div class="am-u-sm-6 am-u-md-6">
    <input  data-validation-message="url链接必须明确传输协议" placeholder="url链接必须明确传输协议"  type="text" name="url" id="url" minlength="0" maxlength="100"
    value="${promotion.url!''}"/>
    <label class="lable-alert" for="user-name"></label>
  </div>
  <div class="am-u-sm-2 am-u-md-4 input-msg" id="urlErrMsg"></div>
</div>

<div class="am-g am-form-group am-margin-top">
    <div class="am-u-sm-4 am-u-md-2 am-text-right"><span style="color: red;">*</span>是否发布</div>
    <div class="am-u-sm-6 am-u-md-6">
        <!-- <input type="text" class="am-input js-pattern-sort" name="sort"  data-validation-message="排序不能为空且只能是纯数字" placeholder="请输入纯数字,越小越向前" maxlength="11" required
            value="${product.sort!99}" /> -->
            <select id="issuance" name="issuance">
                <option value="suance" <%if(promotion.issuance!"" == "suance"){%>selected<%}%>>发布</option>
                <option value="unsuance" <%if(promotion.issuance!"" == "unsuance"){%>selected<%}%>>不发布</option>
            </select>
    </div>
    <div class="am-u-sm-2 am-u-md-4 input-msg"></div>
</div>

